package com.wry.spring.extension;

import com.wry.spring.dao.User;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * <h1>  </h1>
 *
 * @author wry
 * @since 2025.04.07
 */
@Component
public class MyFactoryBean implements FactoryBean {

    private String msg;

    public String getMsg() {
        return msg;
    }


    public MyFactoryBean() {
        this.msg = "这是无参构造出来的东西";
    }

    public MyFactoryBean(String msg) {
        this.msg = msg;
    }

    @Override
    public Object getObject() throws Exception {
        return new MyFactoryBean("这是返回的getObject");
    }

    @Override
    public Class<?> getObjectType() {
        return MyFactoryBean.class;
    }
}
